home *** CD-ROM | disk | FTP | other *** search
- ; Install jpeg.library
- ; $VER: Install-jpeglibrary V1.0 (20.8.2000)
- ; © 2000 Paul Huxham
-
- (set #catalog 0) ; english language is default
-
- ; Find the current language
- (set #i 0)
- (while (set #thisfile (select #i
- "english" "italiano" "deutsch" "español" "czech" "català" "dansk" "français"
- "hrvatski" "nederlands" "norsk" "polski" "português"
- "russian" "srpski" "suomi" "svenska" "ÃeÓtina"
- ""))
- (
- (if (= @language #thisfile)
- (
- (set #catalog #i)
- (set #catalogname #thisfile)
- )
- )
- (set #i (+ #i 1))
- )
- )
-
- (set #catalog "English")
-
- ; Reset #catalogname as the user may have changed the language above
- (if (< #catalog 5)
- (
- (set #catalogname (select #catalog "english" "italiano" "deutsch" "español" "czech"))
- )
- )
-
- ; Some string defaults common for all languages
- (set #HOMEPAGE "http://mafeking.scouts.org.au/steeplesoftware")
- (set #BLANK "\n")
-
-
- ; ************************** English texts ******************************
- (set #INITIAL_MESSAGE
- (cat "\nWelcome to the jpeg.library installer\n\n\n"
- "You can obtain updates and other information\nabout jpeg.library from the homepage\n\n"
- #HOMEPAGE)
- )
- (set #WRONG_INSTALLER_VERSION "\n\n\n\nYou need at least version 42.9 of Installer\nto install jpeg.library")
- (set #WRONG_CPU "\n\n\n\nYou need a 68020 CPU or better\nto use jpeg.library")
- (set #WRONG_OS_VERSION "\n\n\n\nYou need at least AmigaOS V2.0\nto use jpeg.library")
- (set #INSTALLING "\nInstalling")
- (set #PROMPT_INSTALL_PPC "Install PPC (WarpOS) version?")
- (set #INSTALL_WHICH_VERSION "\nInstall version for which CPU?")
- (set #PROMPT_INSTALL_JPEGPREFS "\nInstall jpeg.library prefs?")
- (set #INSTALLING_JPEGPREFS "\nInstalling jpeg.library prefs")
- (set #UPDATES_AVAILABLE "\nYou can get the latest version\nof jpeg.library from my home page")
- (set #YES "Yes")
- (set #NO "No")
-
-
- ; ************************* Global procedures ***************************
- (procedure P_copylib lib destpath newlibname
- (
- (copylib
- (prompt (cat (cat #INSTALLING " ") (fileonly newlibname)))
- (help @copylib-help)
- (newname newlibname)
- (source lib)
- (dest destpath)
- (confirm)
- (optional askuser force)
- )
- )
- )
-
-
- ; *********************** jpeg.library install
-
- (if (< @installer-version (+ (* 65536 42) 9))
- (abort #WRONG_INSTALLER_VERSION)
- )
-
- (if (< (database "cpu") 68020 )
- (abort #WRONG_CPU)
- )
-
- (set os_version (/ (getversion "exec.library" (resident)) 65536))
- (if (< os_version 37)
- (abort #WRONG_OS_VERSION)
- )
-
- ; All essential version numbers are correct, continue installation
- (message #INITIAL_MESSAGE)
-
- (complete 0)
-
-
- ; *********************** Sort out what the user has where
-
- ; Establish CPU type
-
- (set #ourcpu (database "cpu"))
-
- (if (= #ourcpu "68020") (set #ourcpu 0))
- (if (= #ourcpu "68030") (set #ourcpu 0))
- (if (= #ourcpu "68040") (set #ourcpu 2))
- (if (= #ourcpu "68060") (set #ourcpu 4))
-
- (complete 0)
-
-
- ; *********************** Install jpeg.library
-
- ; *********************** Is WarpOS installed
- (set #ppc 1) ; No PPC by default
-
- (set warpos_version 0)
- (set warpos_version (getversion "warpos.library" ))
- (if (> warpos_version 0)
- (
- (set #ppc 0)
-
- (set #ppc
- (askchoice
- (help @askchoice-help)
- (prompt #PROMPT_INSTALL_PPC)
- (choices #YES #NO)
- (default #ppc)
- )
- )
- )
- )
-
- (if (= #ppc 1)
- (set #cpu_install
- (askchoice
- (help @askchoice-help)
- (prompt #INSTALL_WHICH_VERSION)
- (choices "68020" "68020/68881" "68040" "68040/68881" "68060" "68060/68881")
- (default #ourcpu)
- )
- )
- )
-
- (set @default-dest "Libs:")
-
- (if (= @user-level 2) ;If expert user, ask directory
- (
- (set @default-dest
- (askdir
- (prompt #SELECT_INSTALL_DIRECTORY)
- (help @askdir-help)
- (default @default-dest)
- )
- )
- )
- )
-
- (if (= #ppc 0)
- (
- ; PPC installed
- (P_copylib "libs/jpeg.library_wos" @default-dest "jpeg.library")
- )
- (
- (set #entry (select #cpu_install "020std" "020881" "040std" "040881" "060std" "060881" ""))
- (set #entry (cat "libs/jpeg.library_" #entry))
-
- (P_copylib #entry @default-dest "jpeg.library")
- )
- )
-
-
- (complete 80)
- (if (=
- (askchoice
- (help @askchoice-help)
- (prompt #PROMPT_INSTALL_JPEGPREFS)
- (choices #YES #NO)
- (default 0)
- ) 0 )
- (
- (copyfiles
- (prompt #INSTALLING_JPEGPREFS)
- (source "prefs")
- (choices "JpegLibraryPrefs" "JpegLibraryPrefs.info" )
- (help @copyfiles-help)
- (dest @default-dest)
- (files)
- (noposition)
- (optional askuser)
- (confirm)
- )
- )
- )
-
- (complete 100)
-
- ; *********************** Finished installation
-
- (message (cat #UPDATES_AVAILABLE #BLANK #BLANK #HOMEPAGE))
-